package com.parkingspace.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.parkingspace.dao.ParkingInformationMapper;
import com.parkingspace.entity.ParkingInformation;
import com.parkingspace.service.IParkingInformationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 车位信息表 服务实现类
 * </p>
 *
 * @author Gapper
 * @since 2021-05-24
 */
@Service
public class ParkingInformationServiceImpl extends ServiceImpl<ParkingInformationMapper, ParkingInformation> implements IParkingInformationService {

    @Resource
    private ParkingInformationMapper parkingInformationMapper;

    @Override
    public List<ParkingInformation> getAllParking() {
        Map<String,Object> map = new HashMap<>();
        map.put("parking_status",2);
        List<ParkingInformation> parkingInformations = parkingInformationMapper.selectByMap(map);
        return parkingInformations;
    }
}
